package cn.kgc.service.Impl;

import cn.kgc.dao.DistrictMapper;
import cn.kgc.entity.District;
import cn.kgc.service.DistrictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DistrictImpl  implements DistrictService {
    @Autowired
    private DistrictMapper districtMapper;
    @Override
    public List<District> disAll() {
        return districtMapper.selectAll();
    }

    @Override
    public String selectNameById(Integer id) {
        District dis = districtMapper.selectByPrimaryKey(id);
        return dis.getName();

    }
}
